diff options
Diffstat (limited to 'docs/src/pages/[slug].astro')
-rw-r--r-- | docs/src/pages/[slug].astro | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/src/pages/[slug].astro b/docs/src/pages/[slug].astro new file mode 100644 index 000000000..7c08ff268 --- /dev/null +++ b/docs/src/pages/[slug].astro @@ -0,0 +1,20 @@ +--- +export async function getStaticPaths() { + // get english pages that moved from `/` to `/en/` + const englishPages = Astro.fetchContent('./en/**.md'); + + // add pages that are `*.astro` files as well + const otherPages = [{ url: "/en/themes" }]; + + return [...englishPages, ...otherPages].map((page) => ({ + params: { + slug: page.url.slice(4), + }, + props: { + englishSlug: page.url, + } + })); +} +--- + +<meta http-equiv="refresh" content={`0;url=${Astro.props.englishSlug}`} />
\ No newline at end of file |